From 504b288f7c233e7b89794f3986d48a83a946de2d Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Sun, 13 Mar 2005 00:35:14 +0000 Subject: [PATCH] bitkeeper revision 1.1236.25.14 (42338ac2o4mi66zj6XSPc2Z66lgEaQ) Various cleanups. Signed-off-by: Christian Limpach --- tools/libxc/xc_ptrace.c | 98 ++++++++++++++++++++--------------------- xen/Rules.mk | 6 +-- xen/arch/x86/traps.c | 8 ++-- xen/common/domain.c | 2 +- 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/tools/libxc/xc_ptrace.c b/tools/libxc/xc_ptrace.c index ea0b9f44c5..d5f8166acf 100644 --- a/tools/libxc/xc_ptrace.c +++ b/tools/libxc/xc_ptrace.c @@ -49,63 +49,63 @@ char * ptrace_names[] = { }; struct gdb_regs { - long ebx; /* 0 */ - long ecx; /* 4 */ - long edx; /* 8 */ - long esi; /* 12 */ - long edi; /* 16 */ - long ebp; /* 20 */ - long eax; /* 24 */ - int xds; /* 28 */ - int xes; /* 32 */ - int xfs; /* 36 */ - int xgs; /* 40 */ - long orig_eax; /* 44 */ - long eip; /* 48 */ - int xcs; /* 52 */ - long eflags; /* 56 */ - long esp; /* 60 */ - int xss; /* 64 */ + long ebx; /* 0 */ + long ecx; /* 4 */ + long edx; /* 8 */ + long esi; /* 12 */ + long edi; /* 16 */ + long ebp; /* 20 */ + long eax; /* 24 */ + int xds; /* 28 */ + int xes; /* 32 */ + int xfs; /* 36 */ + int xgs; /* 40 */ + long orig_eax; /* 44 */ + long eip; /* 48 */ + int xcs; /* 52 */ + long eflags; /* 56 */ + long esp; /* 60 */ + int xss; /* 64 */ }; #define printval(x) printf("%s = %lx\n", #x, (long)x); #define SET_PT_REGS(pt, xc) \ { \ -pt.ebx = xc.ebx; \ -pt.ecx = xc.ecx; \ -pt.edx = xc.edx; \ -pt.esi = xc.esi; \ -pt.edi = xc.edi; \ -pt.ebp = xc.ebp; \ -pt.eax = xc.eax; \ -pt.eip = xc.eip; \ -pt.xcs = xc.cs; \ -pt.eflags = xc.eflags; \ -pt.esp = xc.esp; \ -pt.xss = xc.ss; \ -pt.xes = xc.es; \ -pt.xds = xc.ds; \ -pt.xfs = xc.fs; \ -pt.xgs = xc.gs; \ + pt.ebx = xc.ebx; \ + pt.ecx = xc.ecx; \ + pt.edx = xc.edx; \ + pt.esi = xc.esi; \ + pt.edi = xc.edi; \ + pt.ebp = xc.ebp; \ + pt.eax = xc.eax; \ + pt.eip = xc.eip; \ + pt.xcs = xc.cs; \ + pt.eflags = xc.eflags; \ + pt.esp = xc.esp; \ + pt.xss = xc.ss; \ + pt.xes = xc.es; \ + pt.xds = xc.ds; \ + pt.xfs = xc.fs; \ + pt.xgs = xc.gs; \ } #define SET_XC_REGS(pt, xc) \ { \ -xc.ebx = pt->ebx; \ -xc.ecx = pt->ecx; \ -xc.edx = pt->edx; \ -xc.esi = pt->esi; \ -xc.edi = pt->edi; \ -xc.ebp = pt->ebp; \ -xc.eax = pt->eax; \ -xc.eip = pt->eip; \ -xc.cs = pt->xcs; \ -xc.eflags = pt->eflags; \ -xc.esp = pt->esp; \ -xc.ss = pt->xss; \ -xc.es = pt->xes; \ -xc.ds = pt->xds; \ -xc.fs = pt->xfs; \ -xc.gs = pt->xgs; \ + xc.ebx = pt->ebx; \ + xc.ecx = pt->ecx; \ + xc.edx = pt->edx; \ + xc.esi = pt->esi; \ + xc.edi = pt->edi; \ + xc.ebp = pt->ebp; \ + xc.eax = pt->eax; \ + xc.eip = pt->eip; \ + xc.cs = pt->xcs; \ + xc.eflags = pt->eflags; \ + xc.esp = pt->esp; \ + xc.ss = pt->xss; \ + xc.es = pt->xes; \ + xc.ds = pt->xds; \ + xc.fs = pt->xfs; \ + xc.gs = pt->xgs; \ } diff --git a/xen/Rules.mk b/xen/Rules.mk index e262d690c8..e604985ee8 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -1,10 +1,10 @@ verbose ?= n debug ?= n -debugger ?= n perfc ?= n trace ?= n optimize ?= y +domu_debug ?= n crash_debug ?= n # Currently supported architectures: x86_32, x86_64 @@ -55,8 +55,8 @@ else CFLAGS += -DVERBOSE endif -ifeq ($(debugger),y) -CFLAGS += -DXEN_UDB +ifeq ($(domu_debug),y) +CFLAGS += -DDOMU_DEBUG endif ifeq ($(crash_debug),y) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index df728da1a7..49d3a89086 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -223,7 +223,7 @@ asmlinkage int do_int3(struct xen_regs *regs) show_registers(regs); panic("CPU%d FATAL TRAP: vector = 3 (Int3)\n", smp_processor_id()); } -#ifdef XEN_UDB +#ifdef DOMU_DEBUG else if ( KERNEL_MODE(ed, regs) && ed->domain->id != 0 ) { if ( !test_and_set_bit(EDF_CTRLPAUSE, &ed->ed_flags) ) { @@ -234,7 +234,7 @@ asmlinkage int do_int3(struct xen_regs *regs) return 0; } -#endif /* XEN_UDB */ +#endif /* DOMU_DEBUG */ ti = current->arch.traps + 3; tb->flags = TBF_EXCEPTION; tb->cs = ti->cs; @@ -924,7 +924,7 @@ asmlinkage int do_debug(struct xen_regs *regs) */ goto out; } -#ifdef XEN_UDB +#ifdef DOMU_DEBUG else if ( KERNEL_MODE(ed, regs) && ed->domain->id != 0 ) { regs->eflags &= ~EF_TF; @@ -936,7 +936,7 @@ asmlinkage int do_debug(struct xen_regs *regs) goto out; } -#endif /* XEN_UDB */ +#endif /* DOMU_DEBUG */ /* Save debug status register where guest OS can peek at it */ ed->arch.debugreg[6] = condition; diff --git a/xen/common/domain.c b/xen/common/domain.c index 1b1edfe7f6..d906251b02 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -267,7 +267,7 @@ int set_info_guest(struct domain *p, dom0_setdomaininfo_t *setdomaininfo) unsigned long vcpu = setdomaininfo->exec_domain; struct exec_domain *ed; - if ( (vcpu >= MAX_VIRT_CPUS) || ((ed = p->exec_domain[vcpu]) != NULL) ) + if ( (vcpu >= MAX_VIRT_CPUS) || ((ed = p->exec_domain[vcpu]) == NULL) ) return -EINVAL; if (test_bit(DF_CONSTRUCTED, &p->d_flags) && -- 2.30.2